<template>
  <van-card v-for="user in props.userList"
            :desc="user.profile"
            :title="`${user.username}(${user.planetCode})`"
            :thumb="user.avatarUrl"
  >
    <template #tags>
      <van-space wrap>
        <van-tag v-for="tag in user.tags" plain type="primary">
          {{ tag }}
        </van-tag>
      </van-space>
    </template>
    <template #footer>
      <van-button size="mini">联系我</van-button>
    </template>
  </van-card>

  <van-empty v-if="!userList || userList.length == 0" description="描述文字" />
</template>

<script setup lang="ts">

import {userType} from "../models/user";

interface UserCardListProps {
  userList: userType[];
}

const props = withDefaults(defineProps<UserCardListProps>(), {
  // @ts-ignore
  userList: [] as userType,
})

</script>

<style scoped>

</style>